package com.xpalive.config.mybatis.method;

public enum GalaxySqlMethod {
    DEL_PERMANENT_BY_ID("delPermanentById", "根据ID 删除一条数据",
        "<script>\nDELETE FROM %s WHERE %s=#{%s}\n</script>"),
    DEL_PERMANENT_BY_MAP("delPermanentByMap", "根据columnMap 条件删除记录",
        "<script>\nDELETE FROM %s %s\n</script>"),
    DEL_PERMANENT("delPermanent", "根据 entity 条件删除记录", "<script>\nDELETE FROM %s %s %s\n</script>"),
    DEL_PERMANENT_BATCH_BY_IDS("delPermanentBatchIds", "根据ID集合，批量删除数据",
        "<script>\nDELETE FROM %s WHERE %s IN (%s)\n</script>");

    private final String method;
    private final String desc;
    private final String sql;

    GalaxySqlMethod(String method, String desc, String sql) {
        this.method = method;
        this.desc = desc;
        this.sql = sql;
    }

    public String getMethod() {
        return method;
    }

    public String getDesc() {
        return desc;
    }

    public String getSql() {
        return sql;
    }
}
